package com.dragon.modules.yuegou.query.coupon;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.coupon.WelfareEntity;
import com.dragon.modules.yuegou.enums.coupon.WelfareStatus;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 优惠券福利信息表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-10-14 15:14:59
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class WelfareQuery extends WelfareEntity implements Query<WelfareEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 集团ID查询条件 */
	@JsonUnwrapped(prefix = "groupId")
	private Condition<String> groupIdCondition;

    /** 商圈ID查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 券模板ID查询条件 */
	@JsonUnwrapped(prefix = "couponTemplateId")
	private Condition<String> couponTemplateIdCondition;

    /** 福利数量/每人每次领取多少张查询条件 */
	@JsonUnwrapped(prefix = "num")
	private Condition<Integer> numCondition;

    /** 发放开始时间查询条件 */
	@JsonUnwrapped(prefix = "beginTime")
	private Condition<LocalDateTime> beginTimeCondition;

    /** 发放结束时间查询条件 */
	@JsonUnwrapped(prefix = "endTime")
	private Condition<LocalDateTime> endTimeCondition;

    /** [枚举]上架状态：0-已下架-OFF_SHELF、1-已上架-ON_SHELF查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<WelfareStatus> statusCondition;

    /** 创建人ID查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 修改人ID查询条件 */
	@JsonUnwrapped(prefix = "modifiedBy")
	private Condition<String> modifiedByCondition;

    /** 修改时间查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

    /** 删除标识：0-未删除、1-已删除查询条件 */
	@JsonUnwrapped(prefix = "del")
	private Condition<Boolean> delCondition;

    /** 删除人ID查询条件 */
	@JsonUnwrapped(prefix = "delBy")
	private Condition<String> delByCondition;

    /** 删除时间查询条件 */
	@JsonUnwrapped(prefix = "delTime")
	private Condition<LocalDateTime> delTimeCondition;
	
    /** 优惠券模板名称查询条件 */
	@JsonUnwrapped(prefix = "title")
	private String title;
	
	
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * 构造一个查询条件对象
	 */
	public WelfareQuery() {
		super();
	}
	
	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public WelfareQuery(WelfareEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public WelfareQuery(WelfareQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.groupIdCondition != null) {
			this.groupIdCondition = other.groupIdCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.couponTemplateIdCondition != null) {
			this.couponTemplateIdCondition = other.couponTemplateIdCondition.copy();
		}
		if(other.numCondition != null) {
			this.numCondition = other.numCondition.copy();
		}
		if(other.beginTimeCondition != null) {
			this.beginTimeCondition = other.beginTimeCondition.copy();
		}
		if(other.endTimeCondition != null) {
			this.endTimeCondition = other.endTimeCondition.copy();
		}
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.modifiedByCondition != null) {
			this.modifiedByCondition = other.modifiedByCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		if(other.delCondition != null) {
			this.delCondition = other.delCondition.copy();
		}
		if(other.delByCondition != null) {
			this.delByCondition = other.delByCondition.copy();
		}
		if(other.delTimeCondition != null) {
			this.delTimeCondition = other.delTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<WelfareEntity> toQueryWrapper() {
		QueryWrapper<WelfareEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (groupIdCondition != null) {
			groupIdCondition.toWrapper(wrapper, COL_GROUP_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (couponTemplateIdCondition != null) {
			couponTemplateIdCondition.toWrapper(wrapper, COL_COUPON_TEMPLATE_ID);
		}
		if (numCondition != null) {
			numCondition.toWrapper(wrapper, COL_NUM);
		}
		if (beginTimeCondition != null) {
			beginTimeCondition.toWrapper(wrapper, COL_BEGIN_TIME);
		}
		if (endTimeCondition != null) {
			endTimeCondition.toWrapper(wrapper, COL_END_TIME);
		}
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (modifiedByCondition != null) {
			modifiedByCondition.toWrapper(wrapper, COL_MODIFIED_BY);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		if (delCondition != null) {
			delCondition.toWrapper(wrapper, COL_DEL);
		}
		if (delByCondition != null) {
			delByCondition.toWrapper(wrapper, COL_DEL_BY);
		}
		if (delTimeCondition != null) {
			delTimeCondition.toWrapper(wrapper, COL_DEL_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回集团ID查询条件
	 * 
	 * @return groupIdCondition 集团ID查询条件
	 */
	public Condition<String> groupId() {
		this.groupIdCondition = new Condition<>();
		return this.groupIdCondition;
	}
	
	/**
	 * 获取集团ID查询条件
	 * 
	 * @return groupIdCondition 集团ID查询条件
	 */
	public Condition<String> getGroupIdCondition() {
		return groupIdCondition;
	}

	/**
	 * 设置集团ID查询条件
	 * 
	 * @param groupIdCondition 集团ID查询条件
	 */
	public void setGroupIdCondition(Condition<String> groupIdCondition) {
		this.groupIdCondition = groupIdCondition;
	}

	/**
	 * 构造并返回商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈ID查询条件
	 * 
	 * @param busdIdCondition 商圈ID查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回券模板ID查询条件
	 * 
	 * @return couponTemplateIdCondition 券模板ID查询条件
	 */
	public Condition<String> couponTemplateId() {
		this.couponTemplateIdCondition = new Condition<>();
		return this.couponTemplateIdCondition;
	}
	
	/**
	 * 获取券模板ID查询条件
	 * 
	 * @return couponTemplateIdCondition 券模板ID查询条件
	 */
	public Condition<String> getCouponTemplateIdCondition() {
		return couponTemplateIdCondition;
	}

	/**
	 * 设置券模板ID查询条件
	 * 
	 * @param couponTemplateIdCondition 券模板ID查询条件
	 */
	public void setCouponTemplateIdCondition(Condition<String> couponTemplateIdCondition) {
		this.couponTemplateIdCondition = couponTemplateIdCondition;
	}

	/**
	 * 构造并返回福利数量/每人每次领取多少张查询条件
	 * 
	 * @return numCondition 福利数量/每人每次领取多少张查询条件
	 */
	public Condition<Integer> num() {
		this.numCondition = new Condition<>();
		return this.numCondition;
	}
	
	/**
	 * 获取福利数量/每人每次领取多少张查询条件
	 * 
	 * @return numCondition 福利数量/每人每次领取多少张查询条件
	 */
	public Condition<Integer> getNumCondition() {
		return numCondition;
	}

	/**
	 * 设置福利数量/每人每次领取多少张查询条件
	 * 
	 * @param numCondition 福利数量/每人每次领取多少张查询条件
	 */
	public void setNumCondition(Condition<Integer> numCondition) {
		this.numCondition = numCondition;
	}

	/**
	 * 构造并返回发放开始时间查询条件
	 * 
	 * @return beginTimeCondition 发放开始时间查询条件
	 */
	public Condition<LocalDateTime> beginTime() {
		this.beginTimeCondition = new Condition<>();
		return this.beginTimeCondition;
	}
	
	/**
	 * 获取发放开始时间查询条件
	 * 
	 * @return beginTimeCondition 发放开始时间查询条件
	 */
	public Condition<LocalDateTime> getBeginTimeCondition() {
		return beginTimeCondition;
	}

	/**
	 * 设置发放开始时间查询条件
	 * 
	 * @param beginTimeCondition 发放开始时间查询条件
	 */
	public void setBeginTimeCondition(Condition<LocalDateTime> beginTimeCondition) {
		this.beginTimeCondition = beginTimeCondition;
	}

	/**
	 * 构造并返回发放结束时间查询条件
	 * 
	 * @return endTimeCondition 发放结束时间查询条件
	 */
	public Condition<LocalDateTime> endTime() {
		this.endTimeCondition = new Condition<>();
		return this.endTimeCondition;
	}
	
	/**
	 * 获取发放结束时间查询条件
	 * 
	 * @return endTimeCondition 发放结束时间查询条件
	 */
	public Condition<LocalDateTime> getEndTimeCondition() {
		return endTimeCondition;
	}

	/**
	 * 设置发放结束时间查询条件
	 * 
	 * @param endTimeCondition 发放结束时间查询条件
	 */
	public void setEndTimeCondition(Condition<LocalDateTime> endTimeCondition) {
		this.endTimeCondition = endTimeCondition;
	}

	/**
	 * 构造并返回[枚举]上架状态：0-已下架-OFF_SHELF、1-已上架-ON_SHELF查询条件
	 * 
	 * @return statusCondition [枚举]上架状态：0-已下架-OFF_SHELF、1-已上架-ON_SHELF查询条件
	 */
	public Condition<WelfareStatus> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}
	
	/**
	 * 获取[枚举]上架状态：0-已下架-OFF_SHELF、1-已上架-ON_SHELF查询条件
	 * 
	 * @return statusCondition [枚举]上架状态：0-已下架-OFF_SHELF、1-已上架-ON_SHELF查询条件
	 */
	public Condition<WelfareStatus> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置[枚举]上架状态：0-已下架-OFF_SHELF、1-已上架-ON_SHELF查询条件
	 * 
	 * @param statusCondition [枚举]上架状态：0-已下架-OFF_SHELF、1-已上架-ON_SHELF查询条件
	 */
	public void setStatusCondition(Condition<WelfareStatus> statusCondition) {
		this.statusCondition = statusCondition;
	}

	/**
	 * 构造并返回创建人ID查询条件
	 * 
	 * @return createdByCondition 创建人ID查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取创建人ID查询条件
	 * 
	 * @return createdByCondition 创建人ID查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建人ID查询条件
	 * 
	 * @param createdByCondition 创建人ID查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回修改人ID查询条件
	 * 
	 * @return modifiedByCondition 修改人ID查询条件
	 */
	public Condition<String> modifiedBy() {
		this.modifiedByCondition = new Condition<>();
		return this.modifiedByCondition;
	}
	
	/**
	 * 获取修改人ID查询条件
	 * 
	 * @return modifiedByCondition 修改人ID查询条件
	 */
	public Condition<String> getModifiedByCondition() {
		return modifiedByCondition;
	}

	/**
	 * 设置修改人ID查询条件
	 * 
	 * @param modifiedByCondition 修改人ID查询条件
	 */
	public void setModifiedByCondition(Condition<String> modifiedByCondition) {
		this.modifiedByCondition = modifiedByCondition;
	}

	/**
	 * 构造并返回修改时间查询条件
	 * 
	 * @return modifiedTimeCondition 修改时间查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取修改时间查询条件
	 * 
	 * @return modifiedTimeCondition 修改时间查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置修改时间查询条件
	 * 
	 * @param modifiedTimeCondition 修改时间查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回删除标识：0-未删除、1-已删除查询条件
	 * 
	 * @return delCondition 删除标识：0-未删除、1-已删除查询条件
	 */
	public Condition<Boolean> del() {
		this.delCondition = new Condition<>();
		return this.delCondition;
	}
	
	/**
	 * 获取删除标识：0-未删除、1-已删除查询条件
	 * 
	 * @return delCondition 删除标识：0-未删除、1-已删除查询条件
	 */
	public Condition<Boolean> getDelCondition() {
		return delCondition;
	}

	/**
	 * 设置删除标识：0-未删除、1-已删除查询条件
	 * 
	 * @param delCondition 删除标识：0-未删除、1-已删除查询条件
	 */
	public void setDelCondition(Condition<Boolean> delCondition) {
		this.delCondition = delCondition;
	}

	/**
	 * 构造并返回删除人ID查询条件
	 * 
	 * @return delByCondition 删除人ID查询条件
	 */
	public Condition<String> delBy() {
		this.delByCondition = new Condition<>();
		return this.delByCondition;
	}
	
	/**
	 * 获取删除人ID查询条件
	 * 
	 * @return delByCondition 删除人ID查询条件
	 */
	public Condition<String> getDelByCondition() {
		return delByCondition;
	}

	/**
	 * 设置删除人ID查询条件
	 * 
	 * @param delByCondition 删除人ID查询条件
	 */
	public void setDelByCondition(Condition<String> delByCondition) {
		this.delByCondition = delByCondition;
	}

	/**
	 * 构造并返回删除时间查询条件
	 * 
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> delTime() {
		this.delTimeCondition = new Condition<>();
		return this.delTimeCondition;
	}
	
	/**
	 * 获取删除时间查询条件
	 * 
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> getDelTimeCondition() {
		return delTimeCondition;
	}

	/**
	 * 设置删除时间查询条件
	 * 
	 * @param delTimeCondition 删除时间查询条件
	 */
	public void setDelTimeCondition(Condition<LocalDateTime> delTimeCondition) {
		this.delTimeCondition = delTimeCondition;
	}

}
